package org.gushi.datastruct.a05;

public class ArrayQueue<E> extends AbstractQueue<E>{

    @Override
    public void offer(E element) {
        list.add(element);
    }

    @Override
    public E poll() {
        if(list.size()<=0){
            return null;
        }
        return list.remove(0);
    }

    @Override
    public E peek() {
        if(list.size()<=0){
            return null;
        }
        return list.get(0);
    }
}
